import React, { useEffect, useState } from 'react';
import RoleManage from '@/pages/role-manage';
import orgService from '@/api/services/orgService';
import { GetRoleRes } from '@/common/types';

const index = () => {
  const [rolesList, setRolesList] = useState<GetRoleRes[]>([]);

  useEffect(() => {
    orgService.getRole().then((res) => {
      setRolesList(res);
      // console.log(res);
    });
  }, []);

  return <RoleManage version={'v2'} rolesList={rolesList} />;
};

export default index;
